home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2002 #11
/
Amiga Plus CD - 2002 - No. 11.iso
/
Tools
/
Freeware
/
DiskMaster
/
Rexx
/
AssignList.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
2002-10-27
|
2KB
|
73 lines
/*
** AssignList.rexx - DiskMaster utility to get assign an create
** new command window which contains a listing of all
** mounted volumes and assigns.
** The list will appear as a new CMD window.
** When you click on any items in the list a new DM window will open
** with a listing of the directory for the selected device or assign.
** Makes it easier to navigate through you hard drive system.
** You may also add additional devices which may not show up in
** the lists produced by ARexx's showlist() function.
**
** Steven D. Kapplin - CIS 70055,1021 8/16/91
*/
if ~show('L','rexxsupport.library') then
call addlib('rexxsupport.library',0,-30)
address DM
temp1 = showlist('assigns')
temp2 = showlist('volumes')
temp = temp2 || ' ' || temp1
AList.0 = words(temp)
do i = 1 to AList.0
AList.i = trim(word(temp,i))
end
BarFormat '"Sorting Volume List ... "'
call sort(AList.0)
BarFormat '"Displaying Volume List ... "'
openwindow 282 12 92 191 CMD
/* Insert additional AddCmd instructions here to include */
/* additional devices which you want to show up. */
AddCmd "DF0:,30,OpenWindow 358 210 224 131 DF0:"
AddCmd "KF0:,30,External c:DiskChange KF0:;OpenWindow 358 210 224 131 KF0:"
do i = 1 to AList.0
AddCmd ''AList.i || ":"',30,OpenWindow 358 210 224 131 'AList.i || ":"''
end
BarFormat '"DM 2.0 %D %M %Y Chip:%C Fast:%P"'
exit
/* CombSort subroutine */
sort: procedure
arg A.0
switch = 1
size = A.0
gap = size
DO UNTIL (switch=0) & (gap=1)
gap = MAX(TRUNC(gap/1.3),1)
switch = 0
DO i = 1 TO size - gap
j = i + gap
IF (a.i>a.j) THEN DO
hold = A.i
a.i = a.j
a.j = hold
switch = switch + 1
END
END
END
return